package com.nbjtjc.safe.service.sys;

import com.nbjtjc.safe.mapper.sys.SysUserCompanyDataMapper;
import com.nbjtjc.safe.model.sys.SysUser;
import com.nbjtjc.safe.model.sys.SysUserCompanyData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @auther guqianbin
 * @date 2018/8/13 11:16
 **/
@Service
public class SysUserCompanyDataService {

    @Autowired
    private SysUserCompanyDataMapper sysUserCompanyDataMapper;

    public SysUserCompanyData add(SysUserCompanyData sysUserCompanyData){

        sysUserCompanyDataMapper.insert(sysUserCompanyData);
        return sysUserCompanyData;
    }

    public boolean delete(SysUserCompanyData sysUserCompanyData){
        sysUserCompanyDataMapper.deleteByPrimaryKey(sysUserCompanyData);
        return true;
    }

    public List find(SysUserCompanyData sysUserCompanyData){
        List<SysUserCompanyData> sysUserCompanyDataList=sysUserCompanyDataMapper.select(sysUserCompanyData);
        return sysUserCompanyDataList;
    }
}
